<!DOCTYPE html>
<html lang="zh-CN">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>爱心代码</title>
    <meta name="keywords" content="爱心代码,爱心">
    <meta name="description" content="这可是同款爱心代码~">
    <link rel="shortcut icon" href="" type="image/x-icon">
    <link rel="stylesheet" href="style.css">
    <style>
        * {
            padding: 0;
            margin: 0;
        }

        body {
            background: url(image/background4.webp) no-repeat center center;
            background-size: cover;
            height: 100vh;
        }

        body::after {
            content: '';
            display: block;
            position: absolute;
            width: 100%;
            height: 100vh;
            -webkit-background-color: rgba(0, 0, 0, .5);
            background-color: rgba(0, 0, 0, .5);
        }

        audio,
        .love_you {
            position: absolute;
            left: 50%;
            top: 1.5rem;
            -webkit-transform: translateX(-50%);
            transform: translateX(-50%);
            z-index: 1809185784;
        }

        .love_you {
            top: 45%;
            font-family: Georgia, 'Times New Roman', Times, serif;
            font-size: 5rem;
            font-weight: bold;
            color: deeppink;
            letter-spacing: .05rem;
            -moz-animation: love-xf 1.2s alternate ease-in-out;
            -webkit-animation: love-xf 1.2s alternate ease-in-out;
            animation: love-xf 1.2s alternate ease-in-out;
            user-select: none;
            -webkit-text-shadow: 0 0 8px #fff;
            text-shadow: 0 0 8px #fff;
        }

        #lovexf {
            position: absolute;
            width: 100%;
            height: 100%;
            z-index: 520;
        }

        @keyframes love-xf {
            0% {
                opacity: 0.08;
                filter: blur(8px);
                letter-spacing: .1rem;
            }

            100% {
                opacity: 1;
                filter: blur(0);
                letter-spacing: .05rem;
            }
        }

        /* 爱心缩放 */
        @media screen and (max-width: 450px) {
            #lovexf {
                /* .5 指的是在画布原始大小上缩放一半 */
                zoom: .5;
                /* .3 就是缩放 3/10 */
                /* zoom: .3; */
                /* 大家自己尝试 */
            }
        }

        video {
            /* 隐藏 */
            display: none;
            /* 透明 */
            /* opacity: 0; */
        }
    </style>
</head>

<body>
<p class="love_you">李小凤</p>
<!-- 这里替换音乐 -->
<audio  id="love" src="lovexf.mp3" autoplay="autoplay" loop="loop"></audio>
<canvas id="lovexf"></canvas>
<script src="script.js"></script>
<script src="https://player.xfyun.club/love-wuminjun/love.click.js"></script>
<script type="text/javascript">
    window.onload = function(){
        setInterval("toggleSound()",100);
    }

    function toggleSound() {
        var music = document.getElementById("love");//获取ID

        if (music.paused) { //判读是否播放
            music.paused=false;
            music.play(); //没有就播放
        }
    }
</script>

</body>

</html>